<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        .erweima {
            width: 100px;
            height: 200px;
            background-color: skyblue;
        }
        .hide {
            display:none;
        }
        .show {
            display: block;
        }
    </style>
</head>
<body>
    
    <!-- 7. `<div class="erweima hide" id="er">`，
    将class的属性值中的hide更换为show，其他保持不变，请写出适合的方法。  -->
    <input type="button" value="打开" id="btn">
    <div class="erweima hide" id="er">
    <script src="js/common.js"></script>
    <script>
        // 获取元素
        var er = my$("er");
        // 点击将div的属性值改为显示
        var isopen = true;
        btn.onclick = function(){
            if(isopen){
            er.className = "erweima show";
            this.value="关闭";
            isopen = false;
            } else {
            er.className = "";
            this.value="打开";
            isopen = true;
            }
        }
        

    </script>



</body>

</html>